package com.autonavi.abs.common.constant;

import java.nio.charset.Charset;

/**
 * @author wwy
 * @version V1.0
 * <p>Description: common 常量</p>
 * @date 2020-07-20 14:45
 */
public class Constant {

    /**
     * system
     */
    public static final String SYSTEM = "system";

    /**
     * application json
     */
    public static final String CONTENT_TYPE_JSON = "application/json";

    /**
     * http超时
     */
    public static final Integer CONNECT_TIMEOUT_MS = 10000;
    public static final Integer CONNECT_REQUEST_TIMEOUT_MS = 5000;
    public static final Integer READ_TIMEOUT_MS = 30000;

    /**
     * http超时配置2
     */
    public static final Integer CONNECT_TIMEOUT_MS_SHORT = 3000;
    public static final Integer CONNECT_REQUEST_TIMEOUT_MS_SHORT = 3000;
    public static final Integer READ_TIMEOUT_MS_SHORT = 15000;

    /**
     * 正数
     */
    public static final int NEGATIVE = 0;
    /**
     * 负数
     */
    public static final int POSITIVE = 1;

    /**
     * zero string
     */
    public static final String NUMBER_ZERO = "0";
    /**
     * decimal zero string
     */
    public static final String NUMBER_ZERO_2DECIMAL = "0.00";

    /**
     * 1天
     */
    public static final int ONE_DAY = 60 * 60 * 24;

    /**
     * true string
     */
    public static final String BOOLEAN_TRUE = "true";
    /**
     * false string
     */
    public static final String BOOLEAN_FALSE = "false";

    /**
     * utf8
     */
    public static final String CHARSET_UTF8 = "UTF-8";

    /**
     * utf8 charset
     */
    public static final Charset CS_CHARSET_UTF8 = Charset.forName(CHARSET_UTF8);

}
